<?php 
include('./fun.php');
$conn=my_sql($cfg);
$re=adm_login();
if($re['err']=='no_login'){die('<script>no_login()</script>');}
if($re['err']!='ok'){die('<hh><b>'.$re['err'].'</b></hh>');}
$adm=$re['adm'];
if($adm['power']!='adm'){err('抱歉，您没有查看的权限');}

$sql='select * from '.$cfg['e'].'adm  order by id desc';
$l=db($sql);





?>
<style></style>
<hh><b>管理员列表</b></hh>
<mm>
<index>
<a class="m b" onclick="right({title:'新赠管理员',url:'adm_edit.php',width:'500px'})">新增管理员</a>
</index>
<?php 
if(!$l){no_data();}else{
echo '<table>';
echo '<tr><th>用户名</th>
<th>最后登录</th>
<th>操作</th>
</tr>';

foreach($l as $v){

echo '<tr>';
echo '<td>'.$v['username'].'</td>';
echo  '<td>'.($v['last_login']?date('Y-m-d H:i:s',$v['last_date']):'未登录').'</td>';
echo '<td>
'.($v['power']=='adm'?'':'<a>删除</a>').'

</td>';
echo '</tr>';
}

echo '</table>';
}


?>


</mm>
<script></script>